cmake_minimum_required( VERSION 2.8.8 )
#add_definitions(-fno-rtti)

add_compile_options(-std=c++11)
add_definitions(-std=c++11 -Wno-attributes -Wno-deprecated-declarations -DANDROID_STL=c++_shared)

include_directories(include)

include_directories(include/key)

include_directories(include/rockit_common)
include_directories(include/librknn)

include_directories(include/libv4l2)
include_directories(include/taiic_uart)
include_directories(include/isp)
#  aac to pcm include
include_directories(include/faad2)
include_directories(include/libfaad)
include_directories(include/libfaad/codebook)


# include stb_image
include_directories(include/stb)
include_directories(include/postpro)

include_directories(include/mfccs)
include_directories(include/rs_485)

include_directories(include/rk_lr)
include_directories(include/rk_lr/algos)
include_directories(include/rk_lr/common)
include_directories(include/rk_lr/ipc_server)
include_directories(include/rk_lr/iq_parser)
include_directories(include/rk_lr/iq_parser_v2)
include_directories(include/rk_lr/smartIr)
include_directories(include/rk_lr/uAPI2)
include_directories(include/rk_lr/xcore)
include_directories(include/rk_lr/xcore/base)

# include rga_include
include_directories(include/librga)
include_directories(include/librga/utils)
include_directories(include/librga/utils/allocator)

include_directories(include/model)

# include opencv
include_directories(include/opencv)
include_directories(include/opencv2)

include_directories(include/eigen3)

include_directories(include/fftw-3.3.10)

# include test_module
include_directories(include/libtest_module)

set(RT_TEST_COMM_STATIC   rt_test_comm)

if(CMAKE_SYSTEM_NAME MATCHES "Linux")
    set(ROCKIT_DEP_COMMON_LIBS
        ${ROCKIT_DEP_COMMON_LIBS}

        # add rknn
        ${RKNNTOOLKITS_LIBS}
        #add rk_lr
        ${RK_LR_LIBS}
        
        ${TAIIC_FFTW_COMMON_LIBS}

        # add bsa
        ${TAIICBSA_LIBS}
        # add rga
        ${TAIICRGA_LIBS}
        # add opencv
        ${TAIICOPENCV_LIBS}

        -lpthread
	    ${RT_TEST_COMM_STATIC}
	    ${TAIIC_TEST_MODULE_LIBS}
    )
    message(STATUS "Build WITH linker libs for Linux")
endif()

add_subdirectory(common)
add_subdirectory(mod)

install(PROGRAMS ${ROCKIT_DUMPSYS_FILE} DESTINATION "bin")
